import request from '@/utils/request';

export async function getChangeByPage(params: any) {
  return request('/api/project/getChangeByPage', {
    method: 'POST',
    data: params,
  });
}

export async function getContractCodeAndName(params: any) {
  return request('/api/project/getContractCodeAndName', {
    method: 'POST',
  });
}

export async function getChangeType(params: any) {
  return request('/api/project/getChangeType', {
    method: 'POST',
  });
}
export async function addChange(params: any) {
  return request('/api/project/addChange', {
    method: 'POST',
    data: params,
  });
}

export async function updateChange(params: any) {
  return request('/api/project/updateChange', {
    method: 'POST',
    data: params,
  });
}

export async function delChange(params: any) {
  return request('/api/project/delChange', {
    method: 'POST',
    data: params,
  });
}

export async function exportChange(params: any) {
  return request('/api/project/exportChange', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default {
  getChangeByPage,
  getChangeType,
  addChange,
  updateChange,
  delChange,
  exportChange,
};
